<form action="<?php echo site_url("profile/saveEdited/profile"); ?>" id="frm_profile_modal" method="POST">
    <fieldset style="text-align: left;">
        <!-- Form Name -->
        <legend style="color:#0088cc; font-weight: lighter;">Profile Information :</legend>
    </fieldset>
    <div class="span2 label-profile" >First name</div>
    <div class="span2 value-profile">
        <input id="inputFirstnameModal" type="text" 
               name ="firstname"
               value="<?php echo isset($user->firstname) ? $user->firstname : "" ?>"
               required="" placeholder="First Name" class="input-xlarge">
    </div>
    <div class="span2">
        &nbsp;
    </div>
    <div class="clear"></div>
    <div class="span2 label-profile" >Last name</div>
    <div class="span2 value-profile">
        <input id="inputLastnameModal" type="text" name ="lastname"
               value="<?php echo isset($user->lastname) ? $user->lastname : "" ?>"
               required="" placeholder="Last Name" class="input-xlarge">
    </div>
    <div class="span2">
        &nbsp;
    </div>
    <div class="clear"></div>
    <div class="span2 label-profile" >Email</div>
    <div class="span2 value-profile">
        <input id="inputMailModal" type="text" name ="mail"
               value="<?php echo isset($user->mail) ? $user->mail : "" ?>"
               required="" placeholder="Mail" class="input-xlarge">
    </div>
    <div class="span2">
        &nbsp;
    </div>
    <div class="clear"></div>

    <?php
    $m = $f = "";
    if (isset($user->sexe)) {
        if ($user->sexe === "M") {
            $m = "checked=\"checked\"";
        }
        if ($user->sexe === "F") {
            $f = "checked=\"checked\"";
        }
    }
    ?>
    <div class="span2 label-profile" >Gender</div>
    <div class="span2 value-profile">
        <div class="control-group">
            <div class="controls">
                <label class="radio inline" for="radios-1">
                    <input <?php echo $m; ?> type="radio" name="sexe" id="radios-1" value="M" /> 
                    Men
                </label>
                <label class="radio inline" for="radios-0">
                    <input <?php echo $f; ?> type="radio" name="sexe" id="radios-0" value="F" >
                    Women
                </label>

            </div>
        </div>
    </div>
    <div class="span2">
        &nbsp;
    </div><div class="clear"></div>

    <!-- Birthday input-->
    <div class="span2 label-profile" >Birthday</div>
    <div class="span2 value-profile" id="divBirthday">
        <div class="input-append">
            <input value="<?php echo isset($user->birthday_date) ? $user->birthday_date : "" ?>" 
                   style="cursor: pointer; background-color: white; width: 200px; margin-left: 0px;" 
                   readonly="readonly" name="birthday" 
                   type="text" placeholder="Birthday" 
                   class="input-xlarge birthday2"
                   >
            <button onclick="$('.birthday2').val('');
                    return false;" class="btn" style="z-index: 1999">X</button>  
        </div>

    </div>
    <div class="span2">
        &nbsp;
    </div>
    <div class="clear"></div>

    <div class="span2 label-profile" >Presentation</div>
    <div class="span2 value-profile" id="divPresentation">
        <textarea  id="inputPresentation" name="presentation"><?php echo isset($user->presentation) ? $user->presentation : "" ?></textarea>
    </div>
    <div class="span2">
        &nbsp;
    </div>
    <div class="clear"></div>
    <div class="span3">
        <div class="controls">
            <button id="saveProfileModal" name="saveProfileModal" class="btn btn-primary">Save Profile</button>
        </div>
    </div>
    <div class="clear"></div>
</form>
<script>
      $(".birthday2").datepicker({format: 'yyyy-mm-dd'});
</script>
